<div class="page-content-wrap row">
  <div class="col-md-4">
    <div class="panel panel-default">
      <div class="panel-heading ui-draggable-handle">
        <h4><%= t('zerocms.admin.post_type.add_post_type') %> </h4>
      </div>
      <%= render partial: 'form' %>
    </div>
  </div>
   <div class="col-md-8">
      <!-- START BASIC TABLE SAMPLE -->
      <div class="panel panel-default">
        <div class="panel-heading ui-draggable-handle">
            <h4><span class="fa fa-folder"></span> <%= t('zerocms.admin.post_type.post_types') %></h4>
        </div>
        <div class="panel-body">
          <table class="table table-responsive table-hover table-striped">
            <thead>
            <tr>
              <th><%= t('zerocms.admin.table.name') %></th>
              <th><%= t('zerocms.admin.table.description') %></th>
              <th><%= t('zerocms.admin.table.slug') %></th>
              <th><%= t('zerocms.admin.table.qty') %></th>
              <th><%= t('zerocms.admin.table.actions') %></th>
            </tr>
            </thead>

            <tbody>
                <% @post_types.decorate.each do |item| %>
                    <tr>
                        <td><%= item.the_title %></td>
                        <td><%= item.the_content %></td>
                        <td><%= item.the_slug %></td>
                        <td><%= item.the_posts.count %></td>
                        <td>
                            <%= link_to raw('<i class="fa fa-eye"></i>'), item.the_url, class: "btn btn-primary btn-xs", title: "#{t('zerocms.common.visit')}", target: '_blank' %>
                            <%= link_to raw('<i class="fa fa-pencil"></i>'), {action: :edit, id: item.id }, class: "btn btn-default btn-xs zerocms_ajax_request", title: "#{t('zerocms.admin.button.edit')}" %>
                            <%= link_to raw('<i class="fa fa-times"></i>'), { action: :destroy, id: item.id },method: :delete, data: { confirm: t('zerocms.admin.message.delete_item') }, class: "btn btn-danger btn-xs zerocms_ajax_request", title: "#{t('zerocms.admin.button.delete')}" unless item.get_option('not_deleted', false) %>
                        </td>
                    </tr>
                <% end %>
            </tbody>
          </table>
          <%= content_tag("div", raw(t('zerocms.admin.message.data_found_list')), class: "alert alert-warning") if @post_types.empty? %>
            <%= raw zerocms_do_pagination(@post_types) %>
        </div>
      </div>
      <!-- END BASIC TABLE SAMPLE -->
    </div>


  </div>

  <!-- END PAGE CONTENT WRAPPER -->
</div>
